Communication device and non-transitory computer-readable recording medium

ABSTRACT

A communication device may include an NFC interface, a processor, and a memory storing computer-readable instructions. The computer-readable instructions may instruct the communication device to store, in a case where a state of the communication device is a first state, first data in the NFC interface and to store, in a case where the state of the communication device is a second state, the second data in the NFC interface. The NFC interface may establish a first communication link between the communication device and a first external device and transmit the first data to the first external device via the first communication link. The NFC interface may establish a second communication link between the communication device and a second external device and transmit the second data to the second external device via the second communication link by using the NFC system.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No.15/997,041 filed Jun. 4, 2018 which is a continuation of U.S. patentapplication Ser. No. 15/623,725 filed Jun. 15, 2017, issued as U.S. Pat.No. 10,003,914 on Jun. 9, 2018, which is a continuation of U.S. patentapplication Ser. No. 15/066,053 filed Mar. 10, 2016, issued as U.S. Pat.No. 9,712,954 on Jul. 18, 2017, which is a continuation of U.S. patentapplication Ser. No. 14/228,425 filed Mar. 28, 2014, issued as U.S. Pat.No. 9,294,870 on Mar. 22, 2016 which claims priority from JapanesePatent Application No. 2013-068623, filed on Mar. 28, 2013, the contentof which are incorporated herein by reference in their entirety.

TECHNICAL FIELD

Aspects disclosed herein relate to a technique used in a communicationdevice.

BACKGROUND

An electrical device is equipped with a short-range wirelesscommunication device. The short-range wireless communication deviceautomatically switches its mode between an Initiator mode and aResponder mode at a predetermined timing. The short-range wirelesscommunication device changes a ratio between a period of operation inthe Initiator mode and a period of operation in the Responder mode inaccordance with a status of a power supply connected to the electricaldevice.

SUMMARY

There may be required a new technique for enabling an electrical deviceto operate appropriately in accordance with a status of the electricaldevice itself.

Accordingly, some embodiments provide for a new communication devicethat may operate appropriately in accordance with a status of thecommunication device itself.

According to one or more aspects of the disclosure, a communicationdevice may include an NFC (abbreviation of Near Field Communication)interface, a processor, and a memory storing computer-readableinstructions. The computer-readable instructions, when executed by theprocessor, may instruct of otherwise cause the communication device(e.g., various components thereof) to perform several various. In oneexample, the computer-readable instructions may instruct thecommunication device to store, in a case where a state of thecommunication device is a first state, first data in the NFC interfacewithout storing second data which is different from the first data.Additionally or alternatively, the computer-readable instructions mayinstruct the communication device to store, in a case where the state ofthe communication device is a second state which is different from thefirst state, the second data in the NFC interface without storing thefirst data. The NFC interface may establish, in a case where the firstdata is stored in the NFC interface, a first communication link betweenthe communication device and a first external device. Additionally oralternatively, the NFC interface may transmit, in a case where the firstcommunication link is established, the first data to the first externaldevice via the first communication link by using an NFC system compliantwith an NFC standard. The NFC interface may establish, in a case wherethe second data is stored in the NFC interface, a second communicationlink, which is different from the first communication link, between thecommunication device and a second external device. The NFC interface maytransmit, in a case where the second communication link is established,the second data to the second external device via the secondcommunication link by using the NFC system.

According to the above-described configuration, the communication devicemay be configured to store the first data in the NFC interface in a casewhere the state of the communication device is the first state and tostore the second data in the NFC interface in a case where the state ofthe communication device is the second state. Accordingly, thecommunication device may be configured to perform appropriatecommunication with one of the first and second external devices.Additionally, the communication device may be configured to operateappropriately in accordance with the state of the communication device.

Control methods and computer programs for implementing theabove-described communication device, computer programs, andcomputer-readable storage media storing the computer programs may alsohave novelty and utility. Communication systems including theabove-described communication device and at least one of a plurality ofexternal devices may also have novelty and utility.

DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present disclosure, needssatisfied thereby, and the objects, features, and advantages thereof,reference now is made to the following descriptions taken in connectionwith the accompanying drawings.

FIG. 1 illustrates a configuration of a communication system in anillustrative embodiment according to one or more aspects of thedisclosure.

FIG. 2 is a flowchart depicting an example communication processperformed by a multifunction peripheral (“MFP”) in the illustrativeembodiment according to one or more aspects of the disclosure.

FIG. 3 is a flowchart depicting an example CE mode process performed bythe MFP in the illustrative embodiment according to one or more aspectsof the disclosure.

FIG. 4 is a flowchart depicting an example Writer mode process performedby the MFP in the illustrative embodiment according to one or moreaspects of the disclosure.

FIG. 5 is a flowchart depicting an example Reader mode process performedby the MFP in the illustrative embodiment according to one or moreaspects of the disclosure.

FIG. 6 is a flowchart depicting an example P2P mode process performed bythe MFP in the illustrative embodiment according to one or more aspectsof the disclosure.

FIG. 7 is a sequence diagram depicting communication performed betweendevices when the MFP operates in a CE mode in the illustrativeembodiment according to one or more aspects of the disclosure.

FIG. 8 is a sequence diagram depicting communication performed betweendevices when the MFP operates in a Writer mode in the illustrativeembodiment according to one or more aspects of the disclosure.

FIG. 9 is a sequence diagram depicting communication performed betweendevices when the MFP operates in a Reader mode in the illustrativeembodiment according to one or more aspects of the disclosure.

FIG. 10 is a sequence diagram depicting communication performed betweendevices when the MFP operates in a P2P mode in the illustrativeembodiment according to one or more aspects of the disclosure.

DETAILED DESCRIPTION

Hereinafter, an illustrative embodiment will be described with referenceto the accompanying drawings. Referring to FIG. 1, an exampleconfiguration of a communication system 2 will be described. Thecommunication system 2 includes an access point (“AP”) 6, a personalcomputer (“PC”) 8, a multifunction peripheral (“MFP”) 10, mobileterminals 50 and 80, and an identification card 100. Each of the MFP 10,the mobile terminals 50 and 80, and the identification card 100 isconfigured to perform communication using a communication system thatcomplies with a Near Field Communication (“NFC”) standard (i.e., an NFCsystem). Short-range wireless communication may include wirelesscommunication in compliance with the NFC system. In this illustrativeembodiment, wireless communication using the NFC system is performed incompliance with the International standard, e.g., ISO/IEC 21481 orISO/IEC 18092.

Each of the PC 8, the MFP 10, and the mobile terminals 50 and 80 isconfigured to perform wireless communication using a system incompliance with a Wi-Fi Direct (hereinafter, referred to as a “WFDsystem”). In the WFD system, wireless communication is performed incompliance with the standard IEEE (The Institute of Electrical andElectronics Engineers, Inc.) 802.11 and its family standards (e.g.,802.11a, 802.11b, 802.11g, and 802.11n). A communication method (i.e.,the standards for wireless communication) differs between the NFC systemand the WFD system. For example, the communication method of the WFDsystem has a higher communication speed than the communication method ofthe communication speed of the NFC system.

For example, a WFD network may be configured by establishment of aconnection (hereinafter, referred to as a “WFD connection”) between theMFP 10 and the mobile terminal 50 using the WFD system. Likewise,another WFD network may be configured by establishment of a WFDconnection between the MFP 10 and the PC 8.

The PC 8, the MFP 10, and the mobile terminals 50 and 80 are furtherconfigured to perform wireless communication using a basic Wi-Fi systemthat differs from wireless communication using the WFD system. In oneexample, wireless communication using the basic Wi-Fi system may bewireless communication using the AP 6, and wireless communication usingthe WFD system may be wireless communication without using the AP 6. Forexample, the MFP 10 is allowed to belong to a basic Wi-Fi network byestablishment of a connection between the MFP 10 and the AP 6(hereinafter, referred to as a “basic Wi-Fi connection”) in accordancewith the basic Wi-Fi system. The MFP 10 is allowed to perform wirelesscommunication with another device (e.g., the PC 8 or the mobile terminal50) that belongs in the basic Wi-Fi network, via the AP 6. Acommunication method (i.e., the standards for wireless communication)differs between the NFC system and the basic Wi-Fi system. For example,the communication method of the basic Wi-Fi system may have a highercommunication speed than the communication method of the communicationspeed of the NFC system.

Referring to FIG. 1, a configuration of the MFP 10 will be described.The MFP 10 includes an operation unit 12, a display unit 14, a printingexecution unit 16, a scanning execution unit 18, a wireless LANinterface (“I/F”) 20, an NFC interface (“I/F”) 22, and a control device24. The operation unit 12 includes a plurality of keys. The user isallowed to input various instructions into the MFP 10 by operating theoperation unit 12. The display unit 14 includes a display that isconfigured to display various information thereon. The printingexecution unit 16 includes a printing mechanism using one of an inkjetmethod and a laser method. The scanning execution unit 18 includes ascanning mechanism using one of a charge-coupled device (“CCD”) and acontact image sensor (“CIS”).

The wireless LAN I/F 20 is configured to allow the control device 24 toperform one of wireless communication using the WFD system and wirelesscommunication using the basic Wi-Fi system. The wireless LAN I/F 20includes a single interface physically. Nevertheless, the wireless LANI/F 20 is assigned with a media access control (“MAC”) address used inwireless communication using the WFD system (hereinafter, referred to asa “MAC address for WFD system”) and a MAC address used in wirelesscommunication using the basic Wi-Fi system (hereinafter, “MAC addressfor basic Wi-Fi system”). More specifically, the MAC address for basicWi-Fi system is assigned to the wireless LAN I/F 20 in advance. Thecontrol device 24 generates the MAC address for WFD system, using theMAC address for basic Wi-Fi system, and assigns the generated MACaddress for WFD system to the wireless LAN I/F 20. In some arrangements,the MAC address for WFD system differs from the MAC address for basicWi-Fi system. Therefore, the control device 24 is capable of performingboth wireless communication using the WFD system and wirelesscommunication using the basic Wi-Fi system simultaneously via thewireless LAN I/F 20. Consequently, there occurs a situation in which theMFP 10 belongs in both the WFD network and the basic Wi-Fi network atthe same time. In other embodiments, for example, physically independentchips may be used as the interface configured to perform wirelesscommunication using the WFD system and the interface configured toperform wireless communication using the basic Wi-Fi system.

The user is allowed to change a setting of the wireless LAN I/F 20 byoperating the operation unit 12. The setting of the wireless LAN I/F 20is switched between a setting that wireless communication using the WFDsystem is available (hereinafter, this setting is referred to as “theWFD I/F setting indicates “ON””) and a setting that wirelesscommunication using the WFD system is unavailable (hereinafter, thissetting is referred to as “the WFD I/F setting indicates “OFF””). Acentral processing unit (“CPU”) 30 stores a value indicating a detail(e.g., “ON” or “OFF”) of the WFD I/F setting designated by the user in amemory 32.

The NFC I/F 22 is configured to allow the control device 24 to performwireless communication using the NFC system. The wireless LAN I/F 20 andthe NFC I/F 22 are implemented by physically independent chips.

A communication speed (e.g., a maximum communication speed is 11 to 600Mbps) of wireless communication via the wireless LAN I/F 20 may befaster than a communication speed (e.g., a maximum communication speedis 106 to 424 kbps) of wireless communication using the NFC I/F 22. Afrequency (e.g., 2.4 GHz band or 5.0 GHz band) of a carrier in wirelesscommunication using the wireless LAN I/F 20 may also differ from afrequency (e.g., 13.56 MHz band) of a carrier in wireless communicationusing the NFC I/F 22. The CPU 30 is allowed to perform wirelesscommunication using the NFC system between the MFP 10 and one of themobile terminals 50 and 80 via the NFC I/F 22 in a situation where adistance between the MFP 10 and the one of the mobile terminals 50 and80 is shorter than approximately 10 cm. The CPU 30 is allowed to performwireless communication using one of the WFD system and the basic Wi-Fisystem, between the MFP 10 and one of the mobile terminals 50 and 80 viathe wireless LAN I/F 20, in a situation where the distance between theMFP 10 and the one of the mobile terminals 50 and 80 is longer than,shorter than or equal to approximately 10 cm (e.g., a maximumcommunicable distance is approximately 100 m). That is, a maximumdistance that the MFP 10 can communicate with a communication targetdevice (e.g., the mobile terminal 50) wirelessly via the wireless LANI/F 20 is longer than a maximum distance that the MFP 10 can communicatewith the communication target device wirelessly via the NFC I/F 22.

The control device 24 includes the CPU 30 and the memory 32. The CPU 30performs various processes in accordance with a program (e.g.,instructions) stored in the memory 32. The memory 32 includes aread-only memory (“ROM”), a random-access memory (“RAM”), and a harddisk. The memory 32 stores the above-described program to be executed bythe CPU 30.

According to some configurations, the program may include an applicationprogram and a protocol stack. The application program is designed toenable the CPU 30 to perform a process at an application layer in anOpen System Interconnection (“OSI”) reference model. The protocol stackis designed to enable the CPU 30 to perform a process at a lower layerunderlying the application layer in the OSI reference model. Theprotocol stack includes a Peer-to-Peer (“P2P”) program, an R/W program,and a CE program. The P2P program is a program for performing a processin accordance with a P2P mode of the NFC standard. The R/W program is aprogram for performing a process in accordance with a Reader/Writer modeof the NFC standard. The CE program is a program for performing aprocess in accordance with a Card Emulation (“CE”) mode of the NFCstandard. These programs are programs for performing processes thatcomply with the NFC standard specified by the NFC Forum.

When the MFP 10 belongs to the WFD network, the CPU 30 stores, in thememory 32, information indicating that the MFP 10 belongs to the WFDnetwork and a wireless setting (e.g., an authentication method, anencryption method, a password, a service set identifier (“SSID”) of thewireless network, and a basic service set identifier (“BSSID”)) forperforming communication of target data (e.g., print data or scan data)via the WFD network. When the MFP 10 belongs to the basic Wi-Fi network,the CPU 30 stores, in the memory 32, information indicating that the MFP10 belongs to the basic Wi-Fi network and a wireless setting forperforming communication of target data via the basic Wi-Fi network. TheSSID is an identifier for identifying a wireless network. The BSSID is aunique identifier (e.g., a MAC address) of an access point thatconfigures a wireless network (e.g., a device having a group owner(“G/O”) status in the WFD network).

The memory 32 stores the value indicating the detail (e.g., “ON” or“OFF”) of the WFD I/F setting therein. In some examples, the controldevice 24 is not allowed to perform various processes in accordance withthe WFD system in a state where the WFD I/F setting stored in the memory32 indicates “OFF”. In a state where the WFD I/F setting indicates “ON”,the memory 32 further stores a WFD-system-related value indicating acurrent status (e.g., a G/O status, a client status, or a device status)of the MFP 10.

The memory 32 further stores an URL (hereinafter, referred to as an“application download URL”) for allowing another device (e.g., themobile terminal 50) to download an application program (hereinafter,referred to as an “application for MFP”) that enables the other deviceto perform various functions (e.g., one or more of the printing functionand the scanning function) using the MFP 10. The memory 32 furtherstores an URL of a webpage that describes how to resolve a device error(e.g., a paper jam or a breakdown of a printing mechanism occurring inthe printing execution unit 16) that may occur in the MFP 10(hereinafter, referred to as a “support page URL”). The device errorwill be described in further detail below. The memory 32 further storesa URL of a webpage for introducing consumable items (e.g., ink (toner),and sheets) that may be used in the MFP 10 (hereinafter, referred to asa “consumable item URL”). The application download URL, the support pageURL, and the consumable item URL may be pre-stored in the memory 32 by avendor of the MFP 10.

The memory 32 further stores a value indicating a detail (e.g., “ON” or“OFF”) of an application URL provision mode setting. The “applicationURL provision mode” enables the MFP 10 to provide another terminal withthe above-described application download URL. The user is allowed toswitch the setting of the application URL provision mode between “ON”and “OFF” by operating the operation unit 12. The CPU 30 stores, in thememory 32, the value indicating the detail (e.g., “ON” or “OFF”) of theapplication URL provision mode setting designated by the user.

The memory 32 is further configured to store a writing job therein. Whenthe CPU 30 receives a writing job from the PC 8 via the AP 6, the CPU 30stores the writing job in the memory 32. The writing job includeswriting data designated by the user (e.g., a URL designated by the userand/or text inputted by the user). The memory 32 is further configuredto store a print job therein. When the CPU 30 receives a print job fromthe PC 8 via the AP 6, the CPU 30 stores the print job in the memory 32.The print job includes print data desired to be printed, e.g., by theuser. In the illustrative embodiment, authentication using theidentification card 100 is required in order for the MFP 10 to performprinting based on the print data.

Next, communication using the NFC system will be further described.Hereinafter, a device that is capable of performing communication usingthe NFC system (e.g., the MFP 10, the mobile terminals 50 and 80, andthe identification card 100) is referred to as an “NFC-enabled device”.Hereinafter, a Reader mode and a Writer mode are referred to as an “R/Wmode”.

Among NFC-enabled devices, there is a device in which all the threemodes of the P2P mode, the R/W mode, and the CE mode are available andanother device in which one or two of the three modes are available. Inthe illustrative embodiment, all of the above-described three modes areavailable in each of the MFP 10 and the mobile terminals 50 and 80. Theidentification card 100 is designed to comply with the NFC standard(also referred to as an “NFC-compliant card”). More specifically, the CEmode is available but the P2P mode and the R/W mode are not available inthe identification card 100.

The P2P mode provides two-way communication between NFC-enabled devicesin a pair. It is assumed that the P2P mode is active in both of a firstNFC-enabled device and a second NFC-enabled device. In this case, acommunication link appropriate for the P2P mode (hereinafter, referredto as a “P2P communication link”) is established between the firstNFC-enabled device and the second NFC-enabled device. Under thissituation, for example, the first NFC-enabled device transmits firstpredetermined data to the second NFC-enabled device via the P2Pcommunication link. Then, the second NFC-enabled device transmits secondpredetermined data to the first NFC-enabled device via the same P2Pcommunication link. Thus, two-way communication is implemented. AnNFC-enabled device that is compliant with ISO/IEC 1443 Type A defined bythe NFC Forum and an NFC-enabled device that is compliant with ISO/IEC18092 Type F defined by the NFC Forum are both capable of using the P2Pmode. Nevertheless, an NFC-enabled device that is compliant with ISO/IEC1443 Type B defined by the NFC Forum is not capable of using the P2Pmode.

The R/W mode and the CE mode both provide one-way communication betweenNFC-enabled devices in a pair. The CE mode enables an NFC-enabled deviceto operate as a “card” in a form defined by the NFC Forum. TheNFC-enabled device of Type A, the NFC-enabled device of Type F, and theNFC-enabled device of Type B are capable of using the CE mode. TheReader mode enables an NFC-enabled device to read data from anotherNFC-enabled device that operates in the CE mode as a card. The Writermode enables an NFC-enabled device to write data in another NFC-enableddevice that operates in the CE mode as a card. The Reader mode alsoenables an NFC-enabled device to read data from an NFC-compliant card(e.g., the identification card 100). The Writer mode also enables anNFC-enabled device to write data in the NFC-compliant card.

For example, in one scenario, the Reader mode is active in the firstNFC-enabled device and the CE mode is active in the second NFC-enableddevice. In this case, a communication link appropriate for the Readermode and the CE mode is established between the first NFC-enabled deviceand the second NFC-enabled device. Under this situation, the firstNFC-enabled device performs an operation for reading data from a pseudocard in the second NFC-enabled device via the communication link toreceive the data from the second NFC-enabled device.

In another example, if the Writer mode is active in the firstNFC-enabled device and the CE mode is active in the second NFC-enableddevice, a communication link appropriate for the Writer mode and the CEmode is established between the first NFC-enabled device and the secondNFC-enabled device. Under this situation, the first NFC-enabled deviceperforms an operation for writing data into the pseudo card in thesecond NFC-enabled device via the communication link to transmit thedata to the second NFC-enabled device.

As described above, various combinations of the modes are available toperform communication using the NFC system between NFC-enabled devicesin a pair. For example, for the combinations of the modes in the pair ofNFC-enabled devices, the following five patterns are available: a “P2Pmode and P2P mode” pair, a “Reader mode and CE mode” pair, a “Writermode and CE mode” pair, a “CE mode and Reader mode” pair, and a “CE modeand Writer mode” pair.

An NFC-enabled device cannot create a situation in which both the Readermode and the Writer mode are active simultaneously. That is, while theReader mode is active, the Writer mode is inactive in the NFC-enableddevice. While the Writer mode is active, the Reader mode is in inactivein the NFC-enabled device.

The NFC-enabled devices are configured to establish therebetween acommunication link appropriate for an active mode but not configured toestablish therebetween a communication link appropriate for an inactivemode. For example, when the CE mode is active and the P2P mode and theR/W mode are inactive in the MFP 10, the MFP 10 is allowed to establisha communication link for enabling the MFP 10 to operate in the CE mode.Nevertheless, the MFP 10 is not allowed to establish anothercommunication link (e.g., a communication link for enabling the MFP 10to operate in the inactive P2P mode, the inactive Reader mode, or theinactive Writer mode).

Next, the WFD will be described. The WFD is a standard created by theWi-Fi Alliance and is specified in the “Wi-Fi Peer-to-Peer (P2P)Technical Specification Version 1.1” drafted by the Wi-Fi Alliance.

As described above, the PC 8, the MFP 10, and the mobile terminals 50and 80 are configured to perform thereamong wireless communication usingthe WFD system. Hereinafter, a device that is capable of performingwireless communication in compliance with the WFD system is referred toas a “WFD-enabled device”. The WFD standard defines three statuses ofthe WFD-enabled device: a G/O status, a client status, and a devicestatus. The WFD-enabled device is configured to operate selectively inone of the three statuses.

A wireless network is configured by a device having the G/O status(hereinafter, also referred to as a “G/O-status device”) and one or moredevices having the client status (hereinafter, also referred to as a“client-status device”). In a wireless network, one or moreclient-status devices are present while only one G/O-status device ispresent. The G/O-status device is configured to control the one or moreclient-status devices. More specifically, the G/O-status device isconfigured to generate a management list that describes identifyinginformation (e.g., a media access control (“MAC”) address) of the one ormore client-status devices. When a new client-status device participatesin the wireless network, the G/O-status device adds identifyinginformation of the new client-status device on the management list. Whenone of the one or more client-status devices leaves the wirelessnetwork, the G/O-status device erases the identifying information of thedeparting or departed client-status device.

The G/O-status device is configured to perform wireless communication oftarget data (e.g., data including information on a network layer of theOSI reference model (e.g., print data or scan data)) with one of the oneor more devices that are listed in the management list, such as one ofthe one or more client-status devices (e.g., one or more devicesbelonging to the WFD network). The G/O-status device is configured tonot perform wireless communication of the target data with aclient-status device that is not listed in the management list. TheG/O-status device, however, is configured to perform wirelesscommunication of data for participating in the wireless network (e.g.,data not including the information on the network layer such as a ProbeRequest packet or data of a physical layer of a Probe Response packet)with the unlisted client-status device. For example, the MFP 10 havingG/O status is allowed to receive print data via wireless communicationfrom the mobile terminal 50 (e.g., the mobile terminal 50 having clientstatus) listed in the management list but is not allowed to receiveprint data via wireless communication from a device not listed in themanagement list.

The G/O-status device is configured to serve as a relay stationconfigured to relay wireless communication between a plurality of theclient-status devices that transmit target data (e.g., print data orscan data) therebetween. For example, when the mobile terminal 50 havingthe client status transmits print data via wireless communication toanother printer having the client status, the mobile terminal 50transmits the print data via wireless communication to the MFP 10 havingthe G/O status first and the MFP 10 then transmits the print data viawireless communication to the printer having the client status. That is,the G/O-status device is configured to function as the AP in the basicWFD network.

The WFD-enabled device that is absent from the wireless network (e.g., aWFD-enabled device not listed in the management list) is a device havingthe device status (hereinafter, also referred to as a “device-statusdevice”). The device-status device is configured to perform wirelesscommunication of the data for participating in the WFD network (e.g., aProbe Request packet or data of a physical layer of a Probe Responsepacket) with the G/O-status device but is not allowed to performwireless communication of target data (e.g., print data or scan data)with the G/O-status device via the WFD network.

Next, configurations of the mobile terminals 50 and 80 will be furtherdescribed with reference to FIG. 1. The mobile terminal 50 may include amobile phone (e.g., smartphone), a personal digital assistant (“PDA”), anotebook PC, a tablet PC, a mobile music player, and/or a mobile videoplayer. The mobile terminal 80 may have the same configuration as themobile terminal 50. The mobile terminal 50 includes an operation unit52, a display unit 54, a wireless LAN interface (“I/F”) 56, an NFCinterface (“I/F”) 58, and a control device 60. The operation unit 52includes a plurality of keys. The display unit 54 includes a displayconfigured to display various information thereon. In other embodiments,for example, the mobile terminal 50 may include a touch panel havingfunctions of both the operation unit 52 and the display unit 54.

The wireless LAN I/F 56 and the NFC I/F 58 have the same configurationas the wireless LAN I/F 20 and the NFC I/F 22, respectively, of the MFP10. That is, the control device 60 is allowed to perform wirelesscommunication using the WFD system and wireless communication using thebasic Wi-Fi system via the wireless LAN I/F 56 simultaneously. Thecontrol device 60 is also allowed to perform wireless communicationusing the NFC system via the NFC I/F 58.

The control device 60 includes a CPU 62 and a memory 64. The CPU 62 isconfigured to perform various processes in accordance with a programstored in the memory 64. The memory 64 includes a ROM, a RAM, and a harddisk. The memory 64 stores the above program that is executed by the CPU62. The program includes an application program and a protocol stack,similar to the program stored in the memory 32 of the MFP 10. Theapplication program includes an application program that is designed toenable the MFP 10 to perform various functions (e.g., a printingfunction and/or a scanning function) (hereinafter, referred to as an“application for MFP”). As described below with reference to FIG. 7,upon receipt of an application download URL from the MFP 10, the CPU 62accesses an Internet server (not depicted) offered by the vendor of theMFP 10, using the application download URL. Then, the CPU 62 downloadsand installs the application for MFP in the memory 64 from the server.

The memory 64 stores a first operation system (“OS”) program. The firstOS program enables the mobile terminal 50 to operate as described below.For example, as power of the mobile terminal 50 is turned on, the mobileterminal 50 enters in an initial status in which the Reader mode isactive and the other modes are inactive. In a case where the applicationfor MFP has not yet been installed on the mobile terminal 50, the mobileterminal 50 maintains the initial status. In a case where theapplication for MFP was installed on the mobile terminal 50 but has notbeen started yet, the mobile terminal 50 also maintains the initialstatus. As the application for MFP starts, the mobile terminal 50changes from the initial status to a status in which the P2P mode isactive and the other modes (e.g., the R/W mode and the CE mode) areinactive.

A configuration of the identification card 100 will be described below.The identification card 100 is provided to the user of the PC 8. Asdescribed above, the identification card 100 is an NFC-compliant card,and the CE mode is available while the P2P mode and the R/W mode are notavailable in the identification card 100. In the communication system 2according to the illustrative embodiment, when the MFP 10 belongs to awireless network including the AP 6 and the PC 8, the MFP 10 receives aprint job from the PC 8 via the AP 6 in some cases. The print jobincludes print data. Even when the MFP 10 receives the print job fromthe PC 6, the MFP 10 does not start printing until authentication usingthe identification card 100 succeeds. The identification card 100 storesauthentication data (e.g., a user ID and a password) used forauthentication performed in the MFP 10. Referring to FIG. 9, the user ofthe PC 8 brings the identification card 100 closer to the MFP 10 afterthe user transmits a print job from the PC 8 to the MFP 10. The MFP 10receives the authentication data (e.g., the user ID and the password)from the identification card 100 to perform an authentication process.In response to successful authentication, the MFP 10 starts printing.Thus, the user of the PC 8 may obtain a printed matter while the user ispresent near the MFP 10. Printing in this manner may reduce a risk thata third party takes the printed matter away from the MFP 10.

Next, a Polling operation and a Listen operation performed by anNFC-enabled device are described. For example, in the MFP 10, the NFCI/F 22 performs the Polling operation and the Listen operation inaccordance with the program. In the Polling operation, the NFC I/F 22transmits a polling signal and receives a response signal transmitted inresponse to the polling signal. In the Listen operation, the NFC I/F 22receives a polling signal and transmits a response signal in response tothe polling signal.

The NFC I/F 22 of the MFP 10 is configured to operate selectively in oneof a Polling mode of performing the Polling operation, a Listen mode ofperforming the Listen operation, and a mode of performing none of thePolling operation and the Listen operation (hereinafter, referred to asa “nonperformance mode”). The NFC I/F 22 operates in one of the Pollingmode, the Listen mode, and the nonperformance mode selectively in turn.For example, the NFC I/F 22 may perform a one-cycle operation in whichthe NFC I/F22 operates in the Polling mode first, and then operates inthe Listen mode, and finally operates in the nonperformance mode. TheNFC I/F 22 may perform the one-cycle operation repeatedly.

In the Polling mode, the NFC I/F 22 transmits a polling signal and thenmonitors receipt of a response signal. More specifically, the NFC I/F 22(1) transmits a polling signal to which an NFC-enabled device of Type Acan respond (e.g., a polling signal for Type A) and monitors receipt ofa response signal for a predetermined time period, (2) if a responsesignal has not been received, transmits a polling signal to which anNFC-enabled device of Type B can respond (e.g., a polling signal forType B) and monitors receipt of a response signal for a predeterminedtime period, (3) if a response signal has not been received, transmits apolling signal to which an NFC-enabled device of Type F can respond(e.g., a polling signal for Type F) and monitors receipt of a responsesignal for a predetermined time period. The NFC I/F 22 repeats the aboveoperation. When the NFC I/F 22 receives a response signal from anNFC-enabled device (i.e., a communication target) within thepredetermined time period in one of the steps in the above operation,the communication target is determined as an NFC-enabled device of Typethat corresponds to the polling signal that the NFC-enabled devicereceives immediately before transmitting the response signal. When theNFC I/F 22 receives a response signal from a communication target, theNFC I/F 22 further transmits, to the communication target, an inquirysignal to inquire which of the modes is active in the NFC-enabled devicethat transmitted the response signal.

In the Listen mode, the NFC I/F 22 monitors receipt of a polling signal.Upon receipt of a polling signal, the NFC I/F 22 transmits a responsesignal. The NFC I/F 22 transmits a response signal to an NFC-enableddevice (e.g., a communication target) that is a sender of the pollingsignal only when the NFC I/F 22 receives the polling signal for the typecorresponding to the NFC I/F 22. When the NFC I/F 22 transmits theresponse signal to the communication target, the NFC I/F 22 furtherreceives the inquiry signal from the communication target. Thus, the NFCI/F 22 transmits an active mode signal to the communication target.

In the nonperformance mode, the NFC I/F 22 does not transmit either apolling signal or a response signal even when the NFC I/F 22 receives apolling signal.

The mobile terminals 50 and 80 also repeatedly perform the one-cycleoperation independently. Therefore, for example, when a period duringwhich the NFC I/F 22 of the MFP 10 operates in the Polling mode overlapsa period during which the mobile terminal 50 operates in the Listen modewhile the distance between the MFP 10 and the mobile terminal 50 isshorter than 10 cm, the NFC I/F 22 performs the Polling operation oftransmitting a polling signal to the mobile terminal 50 and receiving aresponse signal from the mobile terminal 50. For example, when a periodduring which the NFC I/F 22 of the MFP 10 operates in the Listen modeoverlaps a period during which the mobile terminal 50 operates in thePolling mode while the distance between the MFP 10 and the mobileterminal 50 is shorter than 10 cm, the NFC I/F 22 performs the Listenoperation of receiving a polling signal from the mobile terminal 50 andtransmitting a response signal to the mobile terminal 50. Hereinafter,an NFC-enabled device that performs the Polling operation is referred toas a “Polling device” and an NFC-enabled device that performs the Listenoperation is referred to as a “Listen device”.

When the NFC I/F 22 performs the Polling operation, that is, when theMFP 10 is a Polling device, subsequent processes to be performed forcommunication are carried on by the CPU 30. More specifically, first,the NFC I/F 22 passes, to the CPU 30, the information indicating whichone of the modes that a communication target serving as a Listen device(e.g., the mobile terminal 50) can operate in (e.g., the informationindicated by the received active mode signal).

For example, in a case where the MFP 10 serving as a Polling device iscurrently in a state where the P2P mode is active and the CE mode andthe R/W mode are inactive and the information passed from the NFC I/F 22indicates that the communication target serving as a Listen device iscurrently in a state where the P2P mode is active, the CPU 30 transmitsan Activation command corresponding to the P2P mode to the communicationtarget and then receives an OK command from the communication target.Thus, a P2P communication link is established between the MFP 10 servingas a Polling device and the communication target serving as a Listendevice.

In another example, in a case where the MFP 10 serving as a Listendevice is currently in a state where the P2P mode is active and the CEmode is inactive and the communication target serving as a Pollingdevice is currently in a state where the P2P mode is active, the CPU 30receives an Activation command corresponding to the P2P mode from thecommunication target. In this case, the CPU 30 determines that the MFP10 needs to operate in the P2P mode, and transmits an OK command to thecommunication target. Thus, a P2P communication link is establishedbetween the MFP 10 serving as a Listen device and the communicationtarget serving as a Polling device.

In still another example, in a case where the MFP 10 serving as a Listendevice is currently in a state where the CE mode is active and the P2Pmode is inactive and the communication target serving as a Pollingdevice is currently in a state where one of the Reader mode and theWriter mode is active, the CPU 32 receives an Activation commandcorresponding to the R/W mode from the communication target. In thiscase, the CPU 32 determines that the MFP 10 needs to operate in the CEmode, and transmits an OK command to the communication target. Thus, acommunication link appropriate for the CE mode and the R/W mode isestablished between the MFP 10 serving as a Listen device and thecommunication target serving as a Polling device.

In a case where the communication link appropriate for the CE mode andthe R/W mode is established, the CPU 32 further receives, from thecommunication target, information indicating which one of the Readermode and the Writer mode that the communication target operates in.Therefore, for example, when the CPU 32 receives information indicatingthat the communication target operates in the Reader mode, acommunication link appropriate for the CE mode and the Reader mode(hereinafter, referred to as an “MFP(CE)-target(R) communication link”)is established between the MFP 10 serving as a Listen device and thecommunication target serving as a Polling device. For another example,when the CPU 32 receives information that the communication targetoperates in the Writer mode, a communication link appropriate for the CEmode and the Writer mode (hereinafter, referred to as an“MFP(CE)-target(W) communication link”) is established between the MFP10 serving as a Listen device and the communication target serving as aPolling device.

In yet another example, in a case where the MFP 10 serving as a Pollingdevice is currently in a state where the Writer mode is active and theother modes are inactive and the information passed from the NFC I/F 22indicates that the communication target serving as the Listen device iscurrently in a state where the P2P mode is active, a communication linkis not be established between the MFP 10 serving as a Polling device andthe communication target serving as a Listen device. Nevertheless, inthis case, the CPU 30 detects that the P2P mode is active in thecommunication target (e.g., YES in step S76 in FIG. 4).

Likewise, in a case where the MFP 10 serving as a Polling device iscurrently in a state where the Reader mode is active and the other modesare inactive and the information passed from the NFC I/F 22 indicatesthat the communication target serving as a Listen device is currently ina state where the P2P mode is active, a communication link is notestablished between the MFP 10 serving as a Polling device and thecommunication target serving as a Listen device. Nevertheless, in thiscase, also, the CPU 30 detects that the P2P mode is active in thecommunication target (e.g., YES in step S98 in FIG. 5).

The PC 8 includes a wireless LAN I/F (e.g., an interface for WFD systemand basic Wi-Fi system) but does not include an NFC I/F. Therefore, thePC 8 is allowed to perform communication with the MFP 10 via thewireless LAN but is not allowed to perform wireless communication usingthe NFC system. The PC 8 includes a driver program that enables the MFP10 to perform one or more functions (e.g., a printing function and/or ascanning function). Normally, the driver program is installed on the PC8 using a medium shipped with the MFP 10. Nevertheless, in otherembodiments, for example, the driver program may be installed on the PC8 from a server offered by the vendor of the MFP 10.

The AP 6 is not a G/O-status device in the WFD system. The AP 6 is acommon AP, e.g., called a wireless access point or a wireless LANrouter. The AP 6 is configured to establish a basic Wi-Fi connectionwith a plurality of devices. Thus, a basic Wi-Fi network including theAP 6 and the plurality of devices is configured. The AP 6 receives datafrom one of the plurality of devices belonging to the basic Wi-Finetwork, and transmits the data to another of the plurality of devices.Accordingly, the AP 6 is configured to relay communication between apair of devices belonging to the basic Wi-Fi network.

Referring to FIG. 2, a detail of a communication process performed bythe CPU 30 of the MFP 10 in accordance with the program will be furtherdescribed. As the power of the MFP 10 is turned ON, the CPU 30 startsthe communication process depicted in FIG. 2. After the communicationprocess starts, the CPU 30 performs a determination in one or more ofsteps S10, S12, S14, S16, and S18 sequentially.

In step S10, the CPU 30 determines whether a device error has occurredin the MFP 10. The device error includes errors caused by any reasonsexcept a consumable item being empty. For example, the device error mayinclude a paper jam occurring in the printing execution unit 16 or abreakdown in the printing mechanism. The device error may furtherinclude a breakdown in the scanning execution unit 18 or a breakdown inthe sensor. In step S10, the CPU 30 checks conditions of the units orportions of the MFP 10 (e.g., the printing execution unit 16 and thescanning execution unit 18). As a result of the condition check, whenthe CPU 30 determines that the device error has occurred, the CPU 30makes a positive determination (e.g., YES) in step S10, and the routineproceeds to step S24. In step S24, the CPU 30 starts the CE mode. Thus,the MFP 10 starts operating in the CE mode. In step S24, the CPU 30 doesnot start the other modes (e.g., the P2P mode and the R/W mode). In stepS26, the CPU 30 stores, in the NFC I/F 22, a URL of a webpage describinghow to resolve the device error occurring in the MFP 10 (e.g., thesupport page URL). More specifically, the CPU 30 stores the support pageURL stored in the memory 32 into the chip constituting the NFC I/F 22.Subsequent to step S26, the routine proceeds to step S36 and the CPU 30performs a CE mode process (see FIG. 3). When the CPU 30 determines thata device error has not occurred in the MFP 10, the CPU 30 makes anegative determination (e.g., NO) in step S10, and the routine proceedsto step S12.

In step S12, the CPU 30 determines whether a consumable item error hasoccurred in the MFP 10. The consumable item error includes the absenceor close to absence of a consumable item such as toner (or ink) or asheet in the printing execution unit 16. The CPU 30 checks a conditionof each consumable item in the printing execution unit 16. When the CPU30 determines that the condition of at least one of the consumable itemsis insufficient to perform printing, the CPU 30 makes a positivedetermination (e.g., YES) in step S12, and the routine proceeds to stepS28. In step S28, the CPU 30 starts the CE mode. Thus, the MFP 10 startsoperating in the CE mode. In step S28, the CPU 30 does not start theother modes (e.g., the P2P mode and the R/W mode). In step S30, the CPU30 stores, in the NFC I/F 22, a URL of a webpage for introducingconsumable items (e.g., ink (or toner) and/or sheets) to be used in theMFP 10 (e.g., the consumable item URL). In one example, the CPU 30stores the consumable item URL stored in the memory 32 into the chipconstituting the NFC I/F 22. Subsequent to step S30, the routineproceeds to step S36 and the CPU 30 performs the CE mode process (seeFIG. 3). When the CPU 30 determines that the conditions of all of theconsumable items are sufficient to perform printing, the CPU 30 makes anegative determination (e.g., NO) in step S12, and the routine proceedsto step S14.

In step S14, the CPU 30 determines whether the application URL provisionmode is enabled in the MFP 10. For example, in step S14, the CPU 30determines whether the value indicating the detail of the applicationURL provision mode setting stored in the memory 32 indicates “ON”. Whenthe value representing the application URL provision mode settingindicates “ON”, the CPU 30 makes a positive determination (e.g., YES) instep S14, and the routine proceeds to step S32. In step S32, the CPU 30starts the CE mode. Thus, the MFP 10 starts operating in the CE mode. Instep S32, the CPU 30 does not start the other modes (e.g., the P2P modeand the R/W mode). In step S34, the CPU 30 stores an applicationdownload URL in the NFC I/F 22. More specifically, the CPU 30 stores theapplication download URL stored in the memory 32 into the chipconstituting the NFC I/F 22. Subsequent to step S34, the routineproceeds to step S36 and the CPU 30 performs the CE mode process (seeFIG. 3). When the value indicating the application URL provision modesetting stored in the memory 32 indicates “OFF”, the CPU 30 makes anegative determination (e.g., NO) in step S14, and the routine proceedsto step S16.

In step S16, the CPU 30 determines whether there is a writing job. Forexample, in step S16, the CPU 30 determines whether the memory 32 storesa writing job therein. As described above, when the CPU 30 receives awriting job from the PC 8 via the AP 6, the CPU 30 stores the receivedwriting job in the memory 32. When the memory 32 stores a writing jobtherein, the CPU 30 makes a positive determination (e.g., YES) in stepS16, and the routine proceeds to step S38. In step S38, the CPU 30starts the Writer mode. Thus, the MFP 10 starts operating in the Writermode. In step S38, the CPU 30 does not start the other modes. Then, instep S40, the CPU 30 performs a Writer mode process (see FIG. 4). Whenthe memory 32 does not store a writing job therein, the CPU 30 makes anegative determination (e.g., NO) in step S16, and the routine proceedsto step S18. According to this configuration, the MFP 10 may operate inthe Writer mode appropriately when the CPU 30 determines that the MFP 10is in a state where the MFP 10 does not need to transmit the URL (e.g.,the support page URL, the consumable item URL, or the applicationdownload URL) to the outside (e.g., an external destination) and has awriting job stored therein (e.g., YES in step S16).

In step S18, the CPU 30 monitors the presence of a print job thatrequires authentication. For example, in step S18, the CPU 30 determineswhether the memory 32 stores a print job therein. As described above,when the CPU 30 receives a print job from the PC 8 via the AP 6, the CPU30 stores the received print job in the memory 32. As described above,the MFP 10 does not perform printing unless authentication is performedusing the identification card 100. When the memory 32 stores a print jobtherein, the CPU 30 makes a positive determination (e.g., YES) in stepS18, and the routine proceeds to step S42. In step S42, the CPU 30starts the Reader mode. Thus, the MFP 10 starts operating in the Readermode. In step S42, the CPU 30 does not start the other modes. In stepS44, the CPU 30 performs a Reader mode process (see FIG. 5). When thememory 32 does not store a print job, the CPU 30 makes a negativedetermination (e.g., NO) in step S18, and the routine proceeds to stepS20. According to this configuration, the MFP 10 may operate in theReader mode appropriately when the CPU 30 determines that the MFP 10 isin a state where the MFP 10 does not need to transmit the URL (e.g., thesupport page URL, the consumable item URL, or the application downloadURL) to the outside and does not have a writing job but a print jobstored therein (e.g., YES in step S18).

In step S20, the CPU 30 starts the P2P mode. Thus, the MFP 10 startsoperating in the P2P mode. In step S20, the CPU 30 does not start theother modes. Then, in step S22, the CPU 30 performs a P2P mode process(see FIG. 6).

As described above, in the illustrative embodiment, when a negativedetermination (e.g., NO) is made in each of steps S10, S12, S14, S16,and S18 in FIG. 2, the CPU 30 places the operation mode of the MFP 10 inthe P2P mode (e.g., step S20). When the MFP 10 operates in the P2P mode,the MFP 10 is not in any state in which the MFP 10 needs to transmit theURL (e.g., the support page URL, the consumable item URL, and theapplication download URL), the state where the MFP 10 has a writing jobtherein, and the state where the MFP 10 has a print job therein.Therefore, according to the configuration of the illustrativeembodiment, the MFP 10 may operate in an appropriate operation mode inaccordance with the state of the MFP 10.

Referring to FIG. 3, a detail of the CE mode process (e.g., step S36 inFIG. 2) performed by the CPU 30 of the MFP 10 will be described. The CEmode process is performed by the CPU 30 of the MFP 10 operating in theCE mode. As the CE mode process starts, the CPU 30 performs monitoringin one or more of steps S50 and S54.

In step S50, the CPU 30 monitors establishment of an MFP(CE)-target(R)communication link. As described above, when the CPU 30 receives anActivation command corresponding to the Reader mode from thecommunication target (e.g., the mobile terminal 50), the CPU 30determines that the MFP(CE)-target(R) communication link has beenestablished. In this case, the CPU 30 makes a positive determination(e.g., YES) in step S50, and ends the CE mode process (e.g. FIG. 3 andstep S36 in FIG. 2).

When the CPU 30 determines that the MFP(CE)-target(R) communication linkhas been established (e.g., YES in step S50), the NFC I/F 22 transmitsthe stored URL (e.g., the support page URL, the consumable item URL, orthe application download URL) to the communication target automaticallyusing the established MFP(CE)-target(R) communication link. According tothis configuration, the MFP 10 may transmit an appropriate URL (e.g.,the support page URL, the consumable item URL, or the applicationdownload URL) to the communication target using the MFP(CE)-target(R)communication link.

In step S54, the CPU 30 monitors establishment of an MFP(CE)-target(W)communication link. As described above, when the CPU 30 receives anActivation command corresponding to the Writer mode from thecommunication target (e.g., the mobile terminal 50) operating in theWriter mode, the CPU 30 determines that the MFP(CE)-target(W)communication link has been established. In this case, the CPU 30 makesa positive determination (e.g., YES) in step S54, and the routineproceeds to step S56.

In step S56, the CPU 30 monitors receipt of an execution request fromthe communication target via the NFC I/F 22 using the MFP(CE)-target(W)communication link. The execution request is a request signal forrequesting an execution of a particular function (e.g., the scanningfunction or the printing function) of the MFP 10. When the CPU 30receives an execution request from a communication target operating inthe Writer mode, the CPU 30 makes a positive determination (e.g., YES)in step S56, and the routine proceeds to step S58. When the CPU 30 doesnot receive an execution request from the communication target within apredetermined timeout period or when the CPU 30 receives informationother than the execution request from the communication target, the CPU30 makes a negative determination (e.g., NO) in step S56, and theroutine proceeds to step S64.

In step S58, the CPU 30 determines whether the MFP 10 is capable ofperforming the particular function indicated by the execution request.For example, when the particular function is printing, in step S58, theCPU 30 checks the condition of the printing execution unit 16 todetermine whether one or both of a device error (e.g., a paper jam or abreakdown of the printing mechanism) and a consumable item error (e.g.,toner (ink) empty or sheet empty) have occurred. As the result of thecondition check, when the CPU 30 determines that none of the deviceerror and the consumable item error has occurred in the printingexecution unit 16, the CPU 30 determines that the particular function isexecutable. Even if a device error has occurred in the scanningexecution unit 18, the CPU 30 determines that the particular function isexecutable (e.g., printing is executable) when the particular functionis printing. In this case, the CPU 30 makes a positive determination(e.g., YES) in step S58, and the routine proceeds to step S60. In a casewhere at least one of a device error and a consumable item error hasoccurred in the printing execution unit 16 when the particular functionis printing, the CPU 30 determines that the particular function isnon-executable. In this case, the CPU 30 makes a negative determination(e.g., NO) in step S58, and the routine proceeds to step S64.

Likewise, for example, when the particular function is scanning, in stepS58, the CPU 30 checks the condition of the scanning execution unit 18to determine whether a device error (e.g., a breakdown of the documentconveyor mechanism or a breakdown of the sensor) has occurred. As aresult of the condition check, when the CPU 30 determines that a deviceerror has not occurred in the scanning execution unit 18, the CPU 30determines the particular function is executable. Although one or bothof a device error and a consumable item error have occurred in theprinting execution unit 16, the CPU 30 determines that the particularfunction is executable (e.g., scanning is executable) when theparticular function is scanning. In this case, the CPU 30 makes apositive determination (e.g., YES) in step S58, and the routine proceedsin step S60. In a case where a device error has occurred in the scanningexecution unit 18 when the particular function is scanning, the CPU 30determines that the particular function is non-executable. In this case,the CPU 30 makes a negative determination (e.g., NO) in step S58, andthe routine proceeds to step S64.

In step S64, the CPU 30 displays, on the display unit 14, an errorscreen including a message indicating that the particular function isnon-executable. Subsequent to step S64, the CPU 30 ends the CE modeprocess (e.g., FIG. 3 and step S36 in FIG. 2).

In step S60, the CPU 30 ends the CE mode and starts the P2P mode. Forexample, first, the CPU 30 disconnects the MFP(CE)-target(W)communication link. That is, the CPU 30 performs communication(reception and transmission) of a Deactivation command and an OKcommand. The NFC standard defines that a Polling device needs totransmit a Deactivation command (e.g., a Listen device needs to receivea Deactivation command). At the time of performing the disconnection ofthe MFP(CE)-target(W) communication link, the communication targetserves as the Polling device and the MFP 10 serves as the Listen device.Therefore, the CPU 30 receives a Deactivation command from thecommunication target via the NFC I/F 22 and transmits an OK command tothe communication target via the NFC I/F 22. Then, the MFP(CE)-target(W)communication link is disconnected. After the MFP(CE)-target(W)communication link is disconnected, the CPU 30 ends the CE mode andstarts the P2P mode. Thus, the MFP 10 starts operating in the P2P mode.The routine proceeds to step S62 and the CPU 30 performs the P2P modeprocess (see FIG. 6). As the CPU 30 ends the P2P mode process of stepS62, the CPU 30 ends the CE mode process.

When neither of the MFP(CE)-target(R) communication link and theMFP(CE)-target(W) communication link is established, the CPU 30 makes anegative determination (e.g., NO) in each of steps S50 and S54, and endsthe CE mode process.

After the CE mode process (e.g., FIG. 3 and step S36 in FIG. 2) ends,the routine returns to step S10 in FIG. 2 and the CPU 30 makes adetermination in step S10 again. Thereafter, when the CPU 30 makes apositive determination (e.g., YES) in one of steps S12, S14, and S16 inFIG. 2, the CPU 30 performs the CE mode process of FIG. 3 again.

Next, referring to FIG. 4, further details of the Writer mode process(e.g., step S40 in FIG. 2) performed by the CPU 30 of the MFP 10 will bedescribed. The Writer mode process is performed by the CPU 30 of the MFP10 operating in the Writer mode. As the Writer mode process starts, theCPU 30 performs monitoring in one or more of steps S70 and S76.

In step S70, the CPU 30 monitors establishment of an MFP(W)-target(CE)communication link. When the CPU 30 transmits an Activation commandcorresponding to the Writer mode to the communication target operatingin the CE mode (e.g., the identification card 100) and receives an OKcommand from the communication target, the CPU 30 determines that theMFP(W)-target(CE) communication link has been established. In this case,the CPU 30 makes a positive determination (e.g., YES) in step S70, andthe routine proceeds to step S72.

In step S72, the CPU 30 transmits writing data (e.g., a URL designatedby the user or text inputted by the user), included in a writing jobstored in the memory 32, to the communication target (e.g., theidentification card 100), using the mobile terminal(W)-target(CE)communication link. In step S74, the CPU 30 deletes the writing jobstored in the memory 32. Subsequent to step S74, the CPU 30 ends theWriter mode process (e.g., FIG. 4 and step S40 in FIG. 2).

In step S76, the CPU 30 monitors detection of a device operating in theP2P mode. As described above, the MFP 10 operates in the Writer mode.For example, the MFP 10 serves as a Polling device. As further describedabove, the device operating in the P2P mode performs the Pollingoperation and the Listen operation repeatedly. Therefore, while thedevice operating in the P2P mode (hereinafter, referred to as a“particular device”) performs the Listen operation, the particulardevice receives a polling signal transmitted by the NFC I/F 22 of theMFP 10. In response to the polling signal, the particular devicetransmits a response signal to the NFC I/F 22 of the MFP 10. Uponreceipt of the response signal from the particular device, the NFC I/F22 of the MFP 10 transmits an inquiry signal to inquire in which of themodes does the particular device operate. Upon receipt of the inquirysignal, the particular device transmits an active mode signal indicatingthat the particular device operates in the P2P mode, to the NFC I/F 22of the MFP 10. The NFC I/F 22 of the MFP 10 receives the active modesignal indicating the particular device operates in the P2P mode, fromthe particular device. The NFC I/F 22 of the MFP 10 passes the activemode signal indicating that the particular device operates in the P2Pmode, to the CPU 30. In this case, the CPU 30 makes a positivedetermination (e.g., YES) in step S76, and the routine proceeds to stepS78.

In step S78, the CPU 30 ends the Writer mode and starts the P2P mode.Thus, the MFP 10 starts operating in the P2P mode. The routine proceedsto step S80 and the CPU 30 performs the P2P mode process (see FIG. 6).After the P2P mode process in step S80 ends, the CPU 30 ends the Writermode process.

When an MFP(W)-target(CE) communication link is not established and adevice operating in the P2P mode is not detected, the CPU 30 makes anegative determination (e.g., NO) in each of steps S70 and S76 and endsthe Writer mode process.

After the Writer mode process (e.g., FIG. 4 and step S40 in FIG. 2)ends, the routine returns to step S10 in FIG. 2 and the CPU 30 performsthe determination in step S10 again. Thereafter, when the CPU 30 makes apositive determination (e.g., YES) in step S16 in FIG. 2, the CPU 30performs the Writer mode process of FIG. 4 again.

Next, referring to FIG. 5, a detail of the Reader mode process (e.g.,step S44 of FIG. 2) performed by the CPU 30 of the MFP 10 will bedescribed. The Reader mode process is performed by the CPU 30 of the MFP10 operating in the Reader mode. As the Reader mode process starts, theCPU 30 performs monitoring in one or more of steps S90 and S98.

In step S90, the CPU 30 monitors establishment of an MFP(R)-target(CE)communication link. When the CPU 30 transmits an Activation commandcorresponding to the Reader mode to the communication target operatingin the CE mode (e.g., the identification card 100) and receives an OKcommand from the communication target, the CPU 30 determines that anMFP(R)-target(CE) communication link has been established. In this case,the CPU 30 makes a positive determination (e.g., YES) in step S90, andthe routine proceeds to step S92.

In step S92, the CPU 30 receives authentication data from thecommunication target (e.g., the identification card 100) via the NFC I/F22 using the MFP(R)-target(CE) communication link. In step S94, the CPU30 performs the authentication process using the received authenticationdata. When the authentication is successful, the CPU 30 allows theprinting execution unit 16 to print an image represented by print dataincluded in a print job. As the printing is completed, the routineproceeds to step S96. In step S96, the CPU 30 deletes the print job fromthe memory 32. Subsequent to step S96, the CPU 30 ends the Reader modeprocess (e.g., FIG. 5 and step S44 in FIG. 2).

In step S98, the CPU 30 monitors detection of a device operating in theP2P mode (e.g., the particular device). As described above, the MFP 10operates in the Reader mode. That is, the MFP 10 serves as the Pollingdevice. As described above, the particular device operating in the P2Pmode performs the Polling operation and the Listen operation repeatedly.Therefore, while the particular device performs the Listen operation,the particular device receives a polling signal transmitted by the NFCI/F 22 of the MFP 10. Upon receipt of the polling signal, the particulardevice transmits a response signal to the NFC I/F 22 of the MFP 10. Uponreceipt of the response signal from the particular device, the NFC I/F22 of the MFP 10 transmits an inquiry signal to inquire in which of themodes does the particular device operate. Upon receipt of the inquirysignal, the particular device transmits an active mode signal indicatingthat the particular device operates in the P2P mode to the NFC I/F 22 ofthe MFP 10. The NFC I/F 22 of the MFP 10 receives, from the particulardevice, the active mode signal indicating that the particular deviceoperates in the P2P mode. The NFC I/F 22 of the MFP 10 passes theinformation indicating that the particular device operates in the P2Pmode, to the CPU 30. In this case, the CPU 30 makes a positivedetermination (e.g., YES) in step S98 and the routine proceeds to stepS100.

In step S100, the CPU 30 ends the Reader mode and starts the P2P mode.Thus, the MFP 10 starts operating in the P2P mode. The routine proceedsto step S102 and the CPU 30 performs the P2P mode process (see FIG. 6).After the P2P mode process in step S102 ends, the CPU 30 ends the Readermode process.

When an MFP(R)-target(CE) communication link is not established and adevice operating in the P2P mode is not detected, the CPU 30 makes anegative determination (e.g., NO) in each of steps S90 and S98 and endsthe Reader mode process.

As the Reader mode process (e.g., FIG. 5 and step S44 in FIG. 2) ends,the routine returns to step S10 in FIG. 2 and the CPU 30 makes thedetermination in step S10 again. Thereafter, when the CPU 30 make apositive determination (e.g., YES) in step S18 in FIG. 2, the CPU 30performs the Reader mode process of FIG. 5 again.

Next, referring to FIG. 6, further details of the P2P mode process(e.g., step S22 in FIG. 2, step S62 in FIG. 3, step S80 in FIG. 4, andstep S102 in FIG. 5) performed by the CPU 30 of the MFP 10 will bedescribed. The P2P mode process is performed by the CPU 30 of the MFP 10operating in the P2P mode. As the P2P mode process starts, the CPU 30performs monitoring in step S110.

In step S110, the CPU 30 monitors establishment of a P2P communicationlink. As described above, for example, in a case where the MFP 10 servesas the Polling device, the CPU 30 determines that a P2P communicationlink has been established when the CPU 30 transmits an Activationcommand corresponding to the P2P mode to the communication target (e.g.,the mobile terminal 50) operating in the P2P mode and receives an OKcommand from the communication target. In this case, the CPU 30 makes apositive determination (e.g., YES) in step S110 and the routine proceedsto step S112. For example, in a case where the MFP 10 serves as theListen device, the CPU 30 determines that a P2P communication link hasbeen established when the CPU 30 receives an Activation commandcorresponding to the P2P mode from the communication target (e.g., themobile terminal 50) operating in the P2P mode and transmits an OKcommand to the communication target. In this case, also, the CPU 30makes a positive determination (e.g., YES) in step S110 and the routineproceeds to step S112.

In step S112, the CPU 30 performs two-way communication (hereinafter,referred to as “P2P communication”) with the communication target (e.g.,the mobile terminal 50) via the NFC I/F 22 using the P2P communicationlink. More specifically, first, the CPU 30 receives an execution requestfor an execution of the particular function and network informationrelated to the network to which the communication target belongs, fromthe communication target. Nevertheless, when the CPU 30 has already beenreceived the execution request from the communication target as of stepS112 (e.g., YES in each of steps S56 and S58 in FIG. 3), the CPU 30 doesnot receive another execution request from the communication targetagain. The CPU 30 transmits, to the communication target, one of settinginformation and change-unnecessary information. The setting informationincludes a wireless setting (e.g., an authentication method, anencryption method, a password, an SSID, and a BSSID) of the network towhich the MFP 10 belongs, and the change-unnecessary informationindicates that the setting change is unnecessary. The detail of two-waycommunication performed in step S112 depends on whether thecommunication target belongs to a network. Hereinafter, the detail oftwo-way communication performed in step S112 will be described for eachcase.

When the communication target belongs to a network, the communicationtarget transmits, to the MFP 10, an execution request for an executionof a particular function and the wireless setting (e.g., SSID and BSSID)of the network (e.g., a wireless LAN or a WFD network) to which thecommunication target belongs. Nevertheless, as described above, when thecommunication target has already transmitted the execution request tothe MFP 10 (e.g., YES in step S56 and YES in step S58 in FIG. 3), thecommunication target does not transmit another execution request to theMFP 10 again. The CPU 30 receives the execution request and the wirelesssetting of the network to which the communication target belongs. Inthis case, the wireless setting of the network to which thecommunication target belongs is the “network information” of thecommunication target.

The CPU 30 determines, based on the received wireless setting, whetherthe MFP 10 belongs to the same network to which the communication targetbelongs. That is, the CPU 30 determines whether the received SSID andBSSID coincide with an SSID and a BSSID, respectively, included in thewireless setting of the network to which the MFP 10 belongs. When theCPU 30 determines that the MFP 10 belongs to the same network to whichthe communication target belongs, the CPU 30 transmits, to thecommunication target, the change-unnecessary information indicating thatthe setting change is unnecessary.

When the CPU 30 determines that the network to which the MFP 10 belongsdiffers from the network to which the communication target belongs, theCPU 30 transmits a wireless setting (e.g., an authentication method, anencryption method, a password, an SSID, and a BSSID) of a WFD network inwhich the MFP 10 serves as a group owner, to the communication target.For example, when the MFP 10 belongs to a WFD network, as a group owner,the CPU 30 transmits the wireless setting used in the WFD network to thecommunication target. For example, when the MFP 10 does not belong tothe WFD network in which the MFP 10 serves as a group owner, the CPU 30changes the status of the MFP 10 to the G/O status and establishes a newWFD network. Then, the CPU 30 transmits a wireless setting of the WFDnetwork to the communication target.

When the communication target does not belong to any network, thecommunication target transmits, to the MFP 10, an execution request forexecuting a particular function and information indicating that thecommunication target does not belong to any network. Nevertheless, also,in this case, when the communication target has already transmitted theexecution request to the MFP 10 (e.g., YES in each steps S56 and S58 inFIG. 3), the communication target does not transmit another executionrequest to the MFP 10 again. The CPU 30 receives the execution requestand the information indicating that the communication target does notbelong to any network. In this case, the information indicating that thecommunication target does not belong to any network is the “networkinformation” of the communication target.

Then, the CPU 30 determines whether the MFP 10 belongs to the WFDnetwork in which the MFP 10 itself serves as a group owner. When the CPU30 determines that the MFP 10 belongs to the WFD network in which theMFP 10 itself serves as a group owner, the CPU 30 transmits a wirelesssetting used in the WFD network to the communication target.

When the CPU 30 determines that the MFP 10 does not belong to the WFDnetwork in which the MFP 10 itself serves as a group owner, the CPU 30changes the status of the MFP 10 to the G/O status and establishes a newWFD network. Then, the CPU 30 transmits a wireless setting of the WFDnetwork to the communication target.

Through the two-way communication in step S112, the wireless settingbecomes available for common use in both the MFP 10 and thecommunication target. The CPU 30 establishes a wireless communicationlink (e.g., a WFD connection or a basic Wi-Fi connection) between theMFP 10 and the communication target via the wireless LAN I/F 20, usingthe common use wireless setting.

Then, in step S114, the CPU 30 executes the particular functionindicated by the execution request. More specifically, in step S114, theCPU 30 performs communication of target data to be used to execute theparticular function indicated by the execution request, between the MFP10 and the communication target, via the wireless LAN I/F 20, using theestablished wireless communication link. For example, when theparticular function is printing, the communication target transmitsprint data (e.g., target data) to the MFP 10. Upon receipt of the targetdata, the CPU 30 allows the printing execution unit 16 to print an imagerepresented by the target data. In another case, for example, when theparticular function is scanning, the CPU 30 allows the scanningexecution unit 18 to scan one or more documents placed on a documentfeed mechanism to generate scan data (e.g., target data). The CPU 30transmits the generated target data to the communication target.

Subsequent to step S114, the CPU 30 ends the P2P mode process. When aP2P communication link is not established, the CPU 30 makes a negativedetermination (e.g., NO) in step S110 and ends the P2P mode process.After the P2P mode process (e.g., step S22 in FIG. 2, step S62 in FIG.3, step S80 in FIG. 4, and step S102 in FIG. 5) ends, the routinereturns to step S10 of FIG. 2 and the CPU 30 performs the determinationin step S10 again. Thereafter, when a negative determination (e.g., NO)is made in step S18 in FIG. 2, when a positive determination (e.g., YES)is made in step S58 in FIG. 3, when a positive determination (e.g., YES)is made in step S76 in FIG. 4, or when a positive determination (e.g.,YES) is made in step S98 in FIG. 5, the CPU 30 performs the P2P modeprocess of FIG. 6 again.

Referring to FIG. 7, example communication performed between the MFP 10and one of the mobile terminals 50 and 80 when the MFP 10 operates inthe CE mode will be described below. In FIG. 7, two communicationexamples will be described wherein one example is communicationperformed between the MFP 10 operating in the CE mode and the mobileterminal 50 operating in the Reader mode, and the other example iscommunication performed between the MFP 10 operating in the CE mode andthe mobile terminal 80 operating in the P2P mode.

In the example depicted in FIG. 7, after the power of the MFP 10 isturned on, the application URL provision mode setting is changed to “ON”through an operation performed on the operation unit 12. Thus, the valueindicating “ON” of the application URL provision mode setting is storedin the memory 32 of the MFP 10 (e.g., YES in step S14 in FIG. 2).Therefore, the MFP 10 starts operating in the CE mode (e.g., step S32 inFIG. 2). Then, the MFP 10 stores the application download URL in the NFCOF 22 (e.g., step S34 in FIG. 2). Thereafter, the MFP 10 monitorsestablishment of one of an MFP(CE)-target(W) communication link and anMFP(CE)-target(R) communication link (e.g., step S50 or S54 in FIG. 3).

In the example depicted in FIG. 7, the application for MFP has not yetbeen installed on the mobile terminal 50. When the power of the mobileterminal 50 is turned on, the mobile terminal 50 enters into the initialstatus in which the Reader mode is active and the other modes areinactive. Then, the mobile terminal 50 monitors establishment of amobile terminal(R)-target(CE) communication link.

As the mobile terminal 50 is brought closer to the MFP 10 under thissituation, the NFC I/F 22 of the MFP 10 and the NFC I/F 58 of the mobileterminal 50 come closer to each other so that the NFC I/F 22 and the NFCI/F 58 become communicable to each other (e.g., a distance therebetweenis shorter than 10 cm). Thus, an MFP 10(CE)-mobile terminal 50(R)communication link is established between the MFP 10 and the mobileterminal 50 via the NFC I/F 22 and the NFC I/F 58 (e.g., YES in step S50in FIG. 3).

After the MFP 10(CE)-mobile terminal 50(R) communication link isestablished between the MFP 10 and the mobile terminal 50, the NFC I/F22 of the MFP 10 transmits the application download URL stored in theNFC I/F 22 to the mobile terminal 50 using the MFP 10(CE)-mobileterminal 50(R) communication link. The mobile terminal 50 receives theapplication download URL.

The mobile terminal 50 accesses a server (e.g., a server offered by thevendor of the MFP 10) indicated by the application download URL, usingthe received application download URL, to download the application forMFP. Then, the mobile terminal 50 installs the downloaded applicationfor MFP in the memory 64. With this installation, the mobile terminal 50becomes capable of performing various processes in accordance with theapplication for MFP.

The mobile terminal 80 has the application for MFP already installedthereon. As a function execution instruction (e.g., the scanninginstruction or the printing instruction) is inputted via the operationportion after the application for MFP starts, the mobile terminal 80shifts to a state where the P2P mode is active and the other modes areinactive.

As the mobile terminal 80 is brought closer to the MFP 10 under thissituation, the mobile terminal 80 operating in the P2P mode detects thatthe MFP 10 is operating in the CE mode. As described above, the mobileterminal operating in the P2P mode performs the Polling operation andthe Listen operation repeatedly. The MFP 10 operating in the CE modeserves as a Listen device that performs the Listen operation. When themobile terminal 80 performs the Polling operation, the mobile terminal80 transmits a polling signal to the MFP 10 serving as a Listen device.Upon receipt of the polling signal from the mobile terminal 80, the MFP10 transmits a response signal to the mobile terminal 80. Upon receiptof the response signal from the MFP 10, the mobile terminal 80 transmitsan inquiry signal to inquire which of the modes the MFP 10 operates.Upon receipt of the inquiry signal, the MFP 10 transmits an active modesignal indicating that the MFP 10 is operating in the CE mode, to themobile terminal 80. Thus, the mobile terminal 80 detects that the MFP 10is operating in the CE mode.

When the mobile terminal 80 detects that the MFP 10 is operating in theCE mode, the mobile terminal 80 ends the P2P mode and starts the Writermode. Then, the mobile terminal 80 monitors establishment of a mobileterminal(W)-target(CE) communication link.

When the MFP 10 and the mobile terminal 80 are present within a range inwhich the MFP 10 and the mobile terminal 80 can perform NFCcommunication with each other under the above situation, an MFP10(CE)-mobile terminal 80(W) communication link is established betweenthe MFP 10 and the mobile terminal 80 (e.g., YES in step S54 in FIG. 3).

After the MFP 10(CE)-mobile terminal 80(W) communication link isestablished between the MFP 10 and the mobile terminal 80, the mobileterminal 80 transmits an execution request for an execution of theparticular function to the MFP 10 using the MFP 10(CE)-mobile terminal80(W) communication link. Upon receipt of the execution request, themobile terminal 80 ends the Writer mode and starts the P2P mode. Then,the mobile terminal 80 monitors establishment of a P2P communicationlink.

The MFP 10 receives the execution request via the NFC I/F 22 (e.g., YESin step S56 in FIG. 3). Then, the MFP 10 determines whether theparticular function indicated by the execution request is executable(e.g., step S58 in FIG. 3). In the example depicted in FIG. 7, the MFP10 determines that the particular function is executable (e.g., YES instep S58 in FIG. 3). Then, the MFP 10 ends the CE mode and starts theP2P mode (e.g., step S60 in FIG. 3). Thus, the MFP 10 and the mobileterminal 80 disconnect the MFP 10(CE)-mobile terminal 80(W)communication link. Then, the MFP 10 monitors establishment of a P2Pcommunication link (e.g., step S110 in FIG. 6).

When the MFP 10 and the mobile terminal 80 are present within a range inwhich the MFP 10 and the mobile terminal 80 can perform NFCcommunication with each other under the above situation, a P2Pcommunication link is established between the MFP 10 and the mobileterminal 80 (e.g., YES in step S110 in FIG. 6). Then, P2P communicationis performed between the MFP 10 and the mobile terminal 80 using the P2Pcommunication link (e.g., step S112 in FIG. 6). For example, the mobileterminal 80 transmits network information (e.g., the wireless setting ofthe network to which the mobile terminal 80 belongs or the informationindicating that the mobile terminal 80 does not belong to any network)to the MFP 10. In the example depicted in FIG. 7, the mobile terminal 80has already transmitted the execution request to the MFP 10 and themobile terminal 80 therefore does not transmit another execution requestto the MFP 10 at this time. Next, the MFP 10 transmits one of thewireless setting of the WFD network in which the MFP 10 itself serves asthe group owner and the change-unnecessary information to the mobileterminal 80. According to this configuration, the MFP 10 may change theoperation mode of the MFP 10 from the CE mode to the P2P modeappropriately. Therefore, the MFP 10 may perform P2P communicationappropriately with the mobile terminal 80 using the P2P communicationlink.

Through the P2P communication, the wireless setting becomes availablefor common use in both the MFP 10 and the mobile terminal 80. The MFP 10and the mobile terminal 80 establish a wireless communication link(e.g., a WFD connection or a basic Wi-Fi connection) therebetween viathe wireless LAN I/F 20 and the wireless LAN I/F of the mobile terminal80, using the common use wireless setting.

Then, the MFP 10 and the mobile terminal 80 perform communication oftarget data, to be used to execute the particular function indicated bythe execution request, therebetween via the wireless LAN I/F 20 and thewireless LAN I/F of the mobile terminal 80, using the establishedwireless communication link (e.g., step S114 in FIG. 6). For example,when the particular function is printing, the mobile terminal 80transmits print data (e.g., target data) to the MFP 10. Upon receipt ofthe target data, the MFP 10 allows the printing execution unit 16 toprint an image represented by the target data. When the particularfunction is scanning, the CPU 30 allows the scanning execution unit 18to scan one or more documents placed on the document feed mechanism togenerate scan data (e.g., target data). The MFP 10 transmits thegenerated target data to the mobile terminal 80.

After the execution of the particular function is completed, the mobileterminal 80 ends the running application for MFP.

Referring to FIG. 8, example communication performed between the MFP 10and one of the identification card 100 and the mobile terminal 80 whenthe MFP 10 operates in the Writer mode will be described. In FIG. 8, twocommunication examples will be described wherein one example iscommunication performed between the MFP 10 operating in the Writer modeand the identification card 100 operating in the CE mode and the otherexample is communication performed between the MFP 10 operating in theWriter mode and the mobile terminal 80 operating in the P2P mode.

In the example depicted in FIG. 8, after the power of the MFP 10 isturned on, the MFP 10 receives a writing job from the PC 8 via the AP 6.The MFP 10 stores the received writing job in the memory 32 (e.g., YESin step S16 in FIG. 2). Thus, the MFP 10 starts operating in the Writermode (e.g., step S38 in FIG. 2). Then, while monitoring establishment ofan MFP(W)-target(CE) communication link (e.g., step S70 in FIG. 4), theMFP 10 monitors detection of a device operating in the P2P mode (e.g.,step S76 in FIG. 4).

In some arrangements, the identification card 100 operates in the CEmode at all times. Accordingly, as the identification card 100 isbrought closer to the MFP 10, an MFP 10(W)-identification card 100(CE)communication link is established between the MFP 10 and theidentification card 100 (e.g., YES in step S70 in FIG. 4).

After the MFP 10(W)-identification card 100(CE) communication link isestablished between the MFP 10 and the identification card 100, the MFP10 transmits writing data (e.g., the URL designated by the user and/ortext inputted by the user) included in the writing job stored in thememory 32 to the identification card 100 using the MFP10(W)-identification card 100(CE) communication link (e.g., step S72 inFIG. 4). The identification card 100 receives the writing data andstores the received writing data therein.

After transmitting the writing data, the MFP 10 deletes the writing jobfrom the memory 32 (e.g., step S74 in FIG. 4).

In the example depicted in FIG. 8, the mobile terminal 80 has theapplication for MFP already installed thereon. As a function executioninstruction (e.g., the scanning instruction or the printing instruction)is inputted via the operation portion after the application for MFPstarts, the mobile terminal 80 starts operating in the P2P mode.

As the mobile terminal 80 is brought closer to the MFP 10 under thissituation, the MFP 10 operating in the Writer mode detects that themobile terminal 80 is operating in the P2P mode. The MFP 10 operating inthe Writer mode serves as a Polling device that performs the Pollingoperation. The mobile terminal 80 operating in the P2P mode performs thePolling operation and the Listen operation repeatedly. While the mobileterminal 80 performs the Listen operation, the mobile terminal 80receives a polling signal transmitted by the MFP 10 serving as thePolling device. Upon receipt of the polling signal, the mobile terminal80 transmits a response signal to the MFP 10. Upon receipt of theresponse signal from the mobile terminal 80, the MFP 10 transmits aninquiry signal to inquire in which of the modes the mobile terminal 80operates. Upon receipt of the inquiry signal, the mobile terminal 80transmits an active mode signal indicating that the mobile terminal 80is operating in the P2P mode, to the MFP 10. Thus, the MFP 10 may detectthat the mobile terminal 80 is operating in the P2P mode (e.g., YES instep S76 in FIG. 4).

When the MFP 10 detects the mobile terminal 80 operating in the P2Pmode, the MFP 10 ends the Writer mode and starts the P2P mode (e.g.,step S78 in FIG. 4). Then, the MFP 10 monitors establishment of a P2Pcommunication link (e.g., step S110 in FIG. 6).

When the MFP 10 and the mobile terminal 80 are present within a range inwhich the MFP 10 and the mobile terminal 80 can perform NFCcommunication with each other under the above situation, a P2Pcommunication link is established between the MFP 10 and the mobileterminal 80 (e.g., YES in step S110 in FIG. 6). Then, P2P communicationis performed between the MFP 10 and the mobile terminal 80 using the P2Pcommunication link (e.g., step S112 in FIG. 6). For example, the mobileterminal 80 transmits, to the MFP 10, an execution request forrequesting execution of the particular function and network information(e.g., one of the wireless setting of the network to which the mobileterminal 80 belongs and the information indicating that the mobileterminal 80 does not belong to any network). Then, the MFP 10 transmits,to the mobile terminal 80, a wireless setting of the WFD network inwhich the MFP 10 itself serves as a group owner and thechange-unnecessary information. According to this configuration, the MFP10 may change the operation mode of the MFP 10 from the Writer mode tothe P2P mode appropriately. Therefore, the MFP 10 may perform P2Pcommunication with the mobile terminal 80 appropriately using the P2Pcommunication link.

Through the P2P communication, the wireless setting becomes availablefor common use in both the MFP 10 and the mobile terminal 80. The MFP 10and the mobile terminal 80 establish a wireless communication link(e.g., a WFD connection or a basic Wi-Fi connection) therebetween viathe wireless LAN I/F 20 and the wireless LAN I/F of the mobile terminal80 using the common use wireless setting.

Then, the MFP 10 and the mobile terminal 80 perform communication oftarget data to be used to execute the particular function indicated bythe execution request, therebetween via the wireless LAN I/F 20 and thewireless LAN I/F of the mobile terminal 80, using the establishedwireless communication link (e.g., step S114 in FIG. 6). For example,when the particular function is printing, the mobile terminal 80transmits print data (e.g., target data) to the MFP 10. Upon receipt ofthe target data, the MFP 10 allows the printing execution unit 16 toprint an image represented by the target data. When the particularfunction is scanning, the MFP 10 allows the scanning execution unit 18to scan one or more documents placed on the document feed mechanism togenerate scan data (e.g., target data). The MFP 10 transmits thegenerated target data to the mobile terminal 80.

After the execution of the particular function is completed, the mobileterminal 80 ends the running application for MFP.

Referring to FIG. 9, example communication performed between the MFP 10and one of the identification card 100 and the mobile terminal 80 whenthe MFP 10 operates in the Reader mode will be described. In FIG. 9, twocommunication examples will be described wherein one example iscommunication performed between the MFP 10 operating in the Reader modeand the identification card 100 operating in the CE mode and the otherexample is communication performed between the MFP 10 operating in theReader mode and the mobile terminal 80 operating in the P2P mode.

In the example depicted in FIG. 9, after the power of the MFP 10 isturned on, the MFP 10 receives a print job from the PC 8 via the AP 6.The MFP 10 stores the received print job in the memory 32 (e.g., YES instep S18 in FIG. 2). Thus, the MFP 10 starts operating in the Readermode (e.g., step S42 in FIG. 2). Then, while monitoring establishment ofan MFP(R)-target(CE) communication link of the MFP 10 (e.g., step S90 inFIG. 5), the MFP 10 monitors detection of a device operating in the P2Pmode (e.g., step S98 in FIG. 5).

As described above, the identification card 100 operates in the CE modeat all times. As the identification card 100 is brought closer to theMFP 10, an MFP 10(R)-identification card 100(CE) communication link isestablished between the MFP 10 and the identification card 100 (e.g.,YES in step S90 in FIG. 5).

After the MFP 10(R)-identification card 100(CE) communication link isestablished between the MFP 10 and the identification card 100, the MFP10 receives, from the identification card 100, authentication datastored in the identification card 100, using the MFP10(R)-identification card 100(CE) communication link (e.g., step S92 inFIG. 5).

Then, the MFP 10 performs the authentication process using the receivedauthentication data (e.g., step S94 in FIG. 5). In the example depictedin FIG. 9, authentication succeeds. After successful authentication, theMFP 10 allows the printing execution unit 16 to print an imagerepresented by print data included in the print job. After the printingis completed, the MFP 10 deletes the print job from the memory 32 (e.g.,step S96 in FIG. 5).

In the example depicted in FIG. 9, the mobile terminal 80 has theapplication for MFP already installed thereon. As a function executioninstruction (e.g., the scanning instruction or the printing instruction)is inputted via the operation portion after the application for MFPstarts, the mobile terminal 80 starts operating in the P2P mode.

As the mobile terminal 80 is brought closer to the MFP 10 under thissituation, the MFP 10 operating in the Reader mode detects that themobile terminal 80 is operating in the P2P mode. The MFP 10 operating inthe Reader mode serves as a Polling device that performs the Pollingoperation. The mobile terminal 80 operating in the P2P mode performs thePolling operation and the Listen operation repeatedly. While the mobileterminal 80 performs the Listen operation, the mobile terminal 80receives a polling signal transmitted by the MFP 10 serving as thePolling device. Upon receipt of the polling signal, the mobile terminal80 transmits a response signal to the MFP 10. Upon receipt of a responsesignal from the mobile terminal 80, the MFP 10 transmits an inquirysignal to inquire in which of the modes does the mobile terminal 80operate. Upon receipt of the inquiry signal, the mobile terminal 80transmits an active mode signal indicating that the mobile terminal 80is operating in the P2P mode, to the MFP 10. Thus, the MFP 10 may detectthat the mobile terminal 80 is operating in the P2P mode (e.g., YES instep S98 in FIG. 5).

When the MFP 10 detects the mobile terminal 80 operating in the P2Pmode, the MFP 10 ends the Reader mode and starts the P2P mode (e.g.,step S100 in FIG. 5). Then, the MFP 10 monitors establishment of a P2Pcommunication link (e.g., step S110 in FIG. 6).

When the MFP 10 and the mobile terminal 80 are present within a range inwhich the MFP 10 and the mobile terminal 80 can perform NFCcommunication with each other under the above situation, a P2Pcommunication link is established between the MFP 10 and the mobileterminal 80 (e.g., YES in step S110 in FIG. 6). Then, P2P communicationis performed between the MFP 10 and the mobile terminal 80 using the P2Pcommunication link (e.g., step S112 in FIG. 6). The P2P communicationperformed here is the same as the P2P communication performed in theexample depicted in FIG. 8, and therefore, a detailed description willbe omitted. According to this configuration, the MFP 10 may change theoperation mode of the MFP 10 from the Reader mode to the P2P modeappropriately. Therefore, the MFP 10 may perform P2P communication withthe mobile terminal 80 appropriately using the P2P communication link.

Through the P2P communication, the wireless setting becomes availablefor common use in both the MFP 10 and the mobile terminal 80. Similar tothe example depicted in FIG. 8, the MFP 10 and the mobile terminal 80establish a wireless communication link (e.g., a WFD connection or abasic Wi-Fi connection) therebetween via the wireless LAN I/F 20 and thewireless LAN I/F of the mobile terminal 80, using the common usewireless setting. Then, the MFP 10 and the mobile terminal 80 performcommunication of target data to be used to execute the particularfunction indicated by the execution request therebetween via thewireless LAN I/F 20 and the wireless LAN I/F of the mobile terminal 80,using the established wireless communication link (e.g., step S114 inFIG. 6). Details of this communication is also the same as thecommunication performed in the example depicted in FIG. 8, andtherefore, a detailed description for this communication will beomitted.

After the execution of the particular function is completed, the mobileterminal 80 ends the running application for MFP.

Referring to FIG. 10, example communication performed between the MFP 10and the mobile terminal 50 operating in the P2P mode when the MFP 10operates in the P2P mode will be described.

In the example depicted in FIG. 10, after the power of the MFP 10 isturned on, the MFP 10 operates in the P2P mode (e.g., NO in step S18,and step S20 in FIG. 2). The MFP 10 monitors establishment of a P2Pcommunication link (e.g., step S110 in FIG. 6).

In the example depicted in FIG. 10, the mobile terminal 50 has theapplication for MFP already installed thereon. As a function executioninstruction (e.g., the scanning instruction or the printing instruction)is inputted via the operation portion after the application for MFPstarts, the mobile terminal 50 shifts to a state where the P2P mode isactive and the other modes are inactive.

As the mobile terminal 50 is brought closer to the MFP 10 under thissituation, a P2P communication link is established between the MFP 10and the mobile terminal 50 (e.g., YES in step S110 in FIG. 6). Then, P2Pcommunication is performed between the MFP 10 and the mobile terminal 50using the P2P communication link (e.g., step S112 in FIG. 6). The P2Pcommunication performed in this case is the same as the P2Pcommunication performed in the examples depicted in FIGS. 8 and 9, andtherefore, a detailed description for the P2P communication will beomitted.

Through the P2P communication, the wireless setting becomes availablefor common use in both the MFP 10 and the mobile terminal 50. Similar tothe examples depicted in FIGS. 8 and 9, the MFP 10 and the mobileterminal 50 establish a wireless communication link (e.g., a WFDconnection or a basic Wi-Fi connection) therebetween via the wirelessLAN I/F 20 and the wireless LAN I/F 56, using the common use wirelesssetting. Then, the MFP 10 and the mobile terminal 50 performcommunication of target data to be used to execute the particularfunction indicated by the execution request therebetween via thewireless LAN I/F 20 and the wireless LAN I/F 56, using the establishedwireless communication link (e.g., step S114 in FIG. 6). Details of thiscommunication is also the same as the communication performed in theexample depicted in FIGS. 8 and 9, and therefore, a detailed descriptionfor this communication will be omitted.

After the execution of the particular function is completed, the mobileterminal 50 ends the running application for MFP.

Effects of the illustrative embodiment will be described below. Asdescribed with reference to FIG. 2, in the illustrative embodiment, whenit is determined that the MFP 10 is in the state where the MFP 10 needsto transmit the URL (e.g., the support page URL, the consumable itemURL, or the application download URL) (e.g., when a device error hasoccurred, when a consumable item error has occurred, or when theapplication URL provision mode is enabled) (e.g., YES in step S10, YESin step S12, or YES in step S14 in FIG. 2), the MFP 10 is allowed tooperate in the CE mode (e.g., in step S24, S28, or S32). As depicted inFIG. 7, when the MFP 10(CE)-mobile terminal 50(R) communication link isestablished between the MFP 10 operating in the CE mode and the mobileterminal 50 operating in the Reader mode (e.g., YES in step S50 in FIG.3), the NFC I/F 22 of the MFP 10 transmits the URL to the mobileterminal 50 using the MFP 10(CE)-mobile terminal 50(R) communicationlink. When it is determined that the MFP 10 is not in the state wherethe MFP 10 needs to transmit the URL (e.g., NO in step S10, NO in stepS12, and NO in step S14 in FIG. 2), the MFP 10 is allowed to operate inone of the operation modes (e.g., the P2P mode, the Writer mode, and theReader mode) other than the CE mode (e.g., step S20, S38, or S42). TheMFP 10 performs an appropriate process in accordance with the operationmode (see FIGS. 7 to 10). That is, the MFP 10 according to theillustrative embodiment may operate in an appropriate operation modedepending on the determination as to whether the MFP 10 is in the statewhere the MFP 10 needs to transmit the URL. Thus, the MFP 10 may performappropriate communication with an external device (e.g., one of themobile terminals 50 and 80 and the identification card 100). Therefore,the MFP 10 according to the illustrative embodiment may operateappropriately in accordance with the state of the MFP 10.

The MFP 10 may be an example of a “communication device”. The mobileterminals 50 and 80 may be an example of a “first external device”, a“third external device”, and/or a “fourth external device”. Each of themobile terminals 50 and 80 and the identification card 100 may be anexample of a “second external device”. Each of the P2P mode, the Readermode, and the Writer mode may be an example of a “first mode”. Each ofthe P2P mode and the CE mode may be an example of a “second mode”. TheURL (e.g., one of the support page URL, the consumable item URL, and theapplication download URL) may be an example of “pre-stored data”. Eachof the execution request, the network information of the mobile terminal50 (80), the wireless setting transmitted by the MFP 10, and thechange-unnecessary information transmitted by the MFP 10 may be anexample of “first data”. The authentication data (see FIG. 9) may be anexample of “second data”. The writing data (see FIG. 8) may be anexample of “third data”. Each of the state where a device error hasoccurred (e.g., YES in step S10 in FIG. 2), the state where a consumableitem error has occurred (e.g., YES in step S12 in FIG. 2), and the statewhere the application URL provision mode is enabled (e.g., YES in stepS14 in FIG. 2) may be an example of a “first state”. The state wherethere is a print job (e.g., YES in step S18 in FIG. 2) may be an exampleof a “second state”. The state where there is a writing job (e.g., YESin step S16 in FIG. 2) may be an example of a “third state”. The MFP10(CE)-mobile terminal 50(R) communication link (see FIG. 7) may be anexample of a “first type of communication link”. Each of the MFP10(P2P)-mobile terminal 50(P2P) communication link (see FIG. 10), theMFP 10(R)-authentication card(CE) communication link (see FIG. 9), andthe MFP(W)-mobile terminal(CE) communication link (see FIG. 8) may be anexample of a “second type of communication link”. The MFP 10(P2P)-mobileterminal 80(P2P) communication link (see FIGS. 9 and 8) may be anexample of a “third type of communication link”. The MFP 10(CE)-mobileterminal 80(W) communication link (see FIG. 7) may be an example of a“fourth type of communication link”. The MFP 10(P2P)-mobile terminal50(P2P) communication link (see FIG. 7) may be an example of a “fifthtype of communication link”. The case where a positive determination(e.g., YES) is made in step S110 in FIG. 6 may be an example of a “firstcase”. The case where a positive determination (e.g., YES) is made instep S90 in FIG. 5 may be an example of a “second case”. The case wherea positive determination (e.g., YES) is made in step S70 in FIG. 4 maybe an example of a “third case”.

The processing performed in each of steps S10, S12, and S14 in FIG. 2may be an example of processing performed by a “first determinationportion”. The processing performed in step S18 in FIG. 2 may be anexample of processing performed by a “second determination portion”. Theprocessing performed in step S16 in FIG. 2 may be an example ofprocessing performed by a “third determination portion”. The processingperformed in each of steps S24, S28, S32, S20, S38, and S42 in FIG. 2may be an example of processing performed by a “mode setting portion”.The processing performed when a positive determination (e.g., YES) ismade in step S50 in FIG. 2 may be an example of processing performed bya “transmission portion”. The processing performed in each of steps S72in FIG. 4, S92 in FIG. 5, and S112 in FIG. 6 may be an example ofprocessing performed by a “first communication control portion”. Theprocessing performed in each of steps S60 in FIG. 3, step S78 in FIG. 4,and S100 in FIG. 5 may be an example of processing performed by a“changing portion”. The processing performed in step S56 in FIG. 3 maybe an example of processing performed by a “reception portion”. Theprocessing performed in step S112 in FIG. 6 may be an example ofprocessing performed by a “second communication control portion”. Theprocessing performed in step S112 in FIG. 6 may be an example ofprocessing performed by a “third communication control portion”.

Various embodiments of the disclosure have been described above;however, such embodiments are only examples and do not limit the scopeof the appended claims. Examples of the modification and alternations ofthe above-described embodiment are described below.

In other embodiments, for example, the CPU 30 of the MFP 10 may make adetermination in each of steps S10, S12, S14, S16, and S18 in FIG. 2 inorder other than the order (e.g., in the order of steps S10, S12, S14,S16, and S18) depicted in FIG. 2. For example, the first determinationportion may be configured to determine whether the communication deviceis in the first state where the communication device needs to transmit,to the outside such as an external destination, the particular datapre-stored in the communication device. The second determination portionmay be configured to determine whether the communication device is inthe second state that differs from the first state. The thirddetermination portion may be configured to determine whether thecommunication device is in the third state that differs from the firststate.

In other embodiments, for example, the CPU 30 of the MFP 10 may omit oneor both of steps S16 and S18 in FIG. 2 so long as the CPU 30 of the MFP10 performs the determination in each of steps S10, S12, and S14 in FIG.2. That is, generally speaking, the mode setting portion may beconfigured to set the operation mode of the communication device to theCE mode of the NFC standard when it is determined that the communicationdevice is in the first state, and to set the operation mode of thecommunication device to the first mode of the NFC standard that differsfrom the CE mode when it is determined that the communication device isnot in the first state.

In other embodiments, for example, the CPU 30 of the MFP 10 may performthe determination in at least one of steps S10, S12, and S14 in FIG. 2.In this case, the CPU 30 may omit one or more of steps S10, S12, and S14in FIG. 2. That is, generally speaking, the first determination portionmay be configured to determine whether the communication device is inthe first state where the communication device needs to transmit, to theoutside, the particular data pre-stored in the communication device.

In the illustrative embodiment, when the communication target (e.g., themobile terminal 50) has already transmitted the execution request to theMFP 10 (e.g., YES in both steps S56 and S58 in FIG. 3), thecommunication target does not transmit another execution request to theMFP 10 in P2P communication performed in step S112 in FIG. 6. Instead ofthis, in other embodiments, for example, in P2P communication performedin step S112 of FIG. 6, the communication target may be configured totransmit another execution request to the MFP 10 even when thecommunication target has already transmitted the execution request tothe MFP 10.

The technique by which the CPU 30 of the MFP 10 receives a print job ora writing job is not limited to the technique by which the CPU 30 of theMFP 10 receives the print job or the writing job via the AP 6. In otherembodiments, for example, the user may input one of a print job and awriting job directly in the MFP 10 by operating the operation unit 12.In this case, the CPU 30 of the MFP 10 may be configured to store theone of the print job and the writing job inputted through the operationunit 12 in the memory 32. Generally speaking, the “third data” may beobtained by the communication device only.

The “communication device” is not limited to a multifunction device thatis configured to perform the printing function and the scanning function(e.g., the MFP 10). In other embodiments, for example, the“communication device” may be a printer that may be configured toperform the printing function only or a scanner that may be configuredto perform the scanning function only. The “communication device” may bea device (e.g., a PC, a server, a mobile terminal (e.g., a mobile phone,a smartphone, and a PDA)) that may be configured to perform one or morefunctions (e.g., an image displaying function or a data calculatingfunction) other than the printing function and the scanning function.That is, the “communication device” may include any device that may becapable of performing communication using the NFC system. The “externaldevice” is also not limited to the mobile terminals 50 and 80 and theidentification card 100, but may include any device that may be capableof performing communication using the NFC system.

In the illustrative embodiment, the processing in all steps depicted inFIGS. 2 to 6 is implemented by software (e.g., the program).Nevertheless, in other embodiments, for example, the processing in atleast one of the steps is implemented by hardware, for example, alogical circuit.

Further, the technical elements described in the specification and thedrawings exhibit technical usability alone or in various combinations,and are not limited to those in the claims at the time of theapplication of the disclosure. Furthermore, the techniques described asexamples in the specification or drawings may achieve a plurality ofobjects simultaneously, and has technical utility by achieving any oneof these objects.

What is claimed is:
 1. A communication device comprising: an NFC(abbreviation of Near Field Communication) interface; and a processorconfigured to: in a case where a state of the communication device is afirst state, store first data in the NFC interface without storingsecond data before a first communication link is established between thecommunication device and an external device, wherein the second data isdifferent from the first data; and in a case where the state of thecommunication device is a second state, store the second data in the NFCinterface without storing the first data before a second communicationlink is established between the communication device and the externaldevice, wherein the second communication link is different from thefirst communication link, wherein the NFC interface is configured to: ina case where the first data is stored in the NFC interface and while thecommunication device is in the first state, establish the firstcommunication link between the communication device and the externaldevice; in a case where the first communication link is established andwhile the communication device is in the first state, transmit the firstdata to the external device via the first communication link by using anNFC system; in a case where the second data is stored in the NFCinterface and while the communication device is in the second state,establish the second communication link between the communication deviceand the external device; and in a case where the second communicationlink is established and while the communication device is in the secondstate, transmit the second data to the external device via the secondcommunication link by using the NFC system.
 2. The communication deviceaccording to claim 1, further comprising a memory configured to storethe first data and the second data, wherein the storing of the firstdata includes storing, in the NFC interface, the first data stored inthe memory, and wherein the storing of the second data includes storing,in the NFC interface, the second data stored in the memory.
 3. Thecommunication device according to claim 1, wherein: the first stateincludes a first error state.
 4. The communication device according toclaim 3, wherein: the first error state includes an error state in whichthe communication device is not capable of performing at least one of aplurality of functions.
 5. The communication device according to claim3, wherein: the second state includes a second error state which isdifferent from the first error state.
 6. The communication deviceaccording to claim 1, wherein: the first data includes first locationinformation of a first web page.
 7. The communication device accordingto claim 6, wherein: the first state includes a first error state, andthe first web page includes information for resolving the first errorstate.
 8. The communication device according to claim 6, wherein: thefirst location information includes a first URL.
 9. The communicationdevice according to claim 6, wherein: the second data includes secondlocation information, which is different from the first locationinformation, of a second web page which is different from the first webpage.
 10. The communication device according to claim 9, wherein: thefirst location information includes a first URL, and the second locationinformation includes a second URL which is different from the first URL.11. The communication device according to claim 1, wherein: the firstdata includes third location information for causing the external deviceto download an application program.
 12. The communication deviceaccording to claim 1, wherein: the first communication link isestablished between the communication device, which operates in a CE(abbreviation of Card Emulation) mode, and the external device, and thesecond communication link is established between the communicationdevice, which operates in the CE mode, and the external device.
 13. Thecommunication device according to claim 1, further comprising: aprinting execution unit, wherein the processor is further configured tocontrol the printing execution unit to print an image represented byprint data.
 14. The communication device according to claim 1, furthercomprising: a scanning execution unit; and wherein the processor isfurther configured to control the scanning execution unit to scan adocument for generating scan data.
 15. The communication deviceaccording to claim 1, further comprising: a communication interfacewhich is different from the NFC interface.
 16. The communication deviceaccording to claim 15, wherein: the communication interface is awireless communication interface for performing a wireless communicationby using the standard IEEE (abbreviation of The Institute of Electricaland Electronics Engineers, Inc.) 802.11 and its family standards. 17.The communication device according to claim 1, wherein: thecommunication device further comprises a wireless communicationinterface, the NFC interface being further configured to transmit thesecond data including a wireless setting, the wireless setting being forestablishing a connection between the communication device and theexternal device via the wireless communication interface, and theprocessor is further configured to perform, after the second data istransmitted to the external device, establishing the connection betweenthe communication device and the external device via the wirelesscommunication interface.